using System.Windows;
using System.Windows.Media;
using WPFTemplateLib.WpfHelpers;

namespace WPFTemplateLib.Attached.AttachGroup
{
	/// <summary>
	/// 表格类元素附加属性托管类
	/// </summary>
	public class TableElement
	{
		#region [附加属性] 列头内边距
		public static Thickness GetColumnHeaderPadding(DependencyObject obj)
		{
			return (Thickness)obj.GetValue(ColumnHeaderPaddingProperty);
		}
		/// <summary>
		/// 设置 列头内边距（默认值 5,0）
		/// </summary>
		public static void SetColumnHeaderPadding(DependencyObject obj, Thickness value)
		{
			obj.SetValue(ColumnHeaderPaddingProperty, value);
		}
		/// <summary>
		/// [附加属性] 列头内边距
		/// </summary>
		public static readonly DependencyProperty ColumnHeaderPaddingProperty =
			DependencyProperty.RegisterAttached("ColumnHeaderPadding", typeof(Thickness), typeof(TableElement),
				new PropertyMetadata(new Thickness(5, 0, 5, 0)));
		#endregion

		#region [附加属性] 列头排序图标填充色(平时)
		public static Brush GetColumnHeaderSortGraphCommonFill(DependencyObject obj)
		{
			return (Brush)obj.GetValue(ColumnHeaderSortGraphCommonFillProperty);
		}
		/// <summary>
		/// 设置 列头排序图标填充色(平时)
		/// </summary>
		public static void SetColumnHeaderSortGraphCommonFill(DependencyObject obj, Brush value)
		{
			obj.SetValue(ColumnHeaderSortGraphCommonFillProperty, value);
		}
		/// <summary>
		/// [附加属性] 列头排序图标填充色(平时)
		/// </summary>
		public static readonly DependencyProperty ColumnHeaderSortGraphCommonFillProperty =
			DependencyProperty.RegisterAttached("ColumnHeaderSortGraphCommonFill", typeof(Brush), typeof(TableElement), 
				new PropertyMetadata(new SolidColorBrush(MediaColorHelper.ColorStrToMediaColor("#BFBFBF"))));
		#endregion

		#region [附加属性] 列头排序图标填充色(已排序)
		public static Brush GetColumnHeaderSortGraphSortedFill(DependencyObject obj)
		{
			return (Brush)obj.GetValue(ColumnHeaderSortGraphSortedFillProperty);
		}
		/// <summary>
		/// 设置 列头排序图标填充色(已排序)
		/// </summary>
		public static void SetColumnHeaderSortGraphSortedFill(DependencyObject obj, Brush value)
		{
			obj.SetValue(ColumnHeaderSortGraphSortedFillProperty, value);
		}
		/// <summary>
		/// [附加属性] 列头排序图标填充色(已排序)
		/// </summary>
		public static readonly DependencyProperty ColumnHeaderSortGraphSortedFillProperty =
			DependencyProperty.RegisterAttached("ColumnHeaderSortGraphSortedFill", typeof(Brush), typeof(TableElement), 
				new PropertyMetadata(new SolidColorBrush(MediaColorHelper.ColorStrToMediaColor("#40A5F9"))));
		#endregion
	}
}
